import request from '@/utils/request';
export async function Create(params: any, control: string) {
    return request('/api/services/app/' + control + '/Create', {
        method: 'POST',
        data: params,
    });
}
export async function Update(params: any, control: string) {
    return request('/api/services/app/' + control + '/Update', {
        method: 'PUT',
        data: params,
    });
}
export async function Delete(params: any, control: string) {
    return request('/api/services/app/' + control + '/Delete', {
        method: 'DELETE',
        params,
    });
}
export async function Get(params: any, control: string) {
    return request('/api/services/app/' + control + '/Get', {
        method: 'GET',
        params,
    });
}
export async function GetAll(params: any, control: string) {
    return request('/api/services/app/' + control + '/GetAll', {
        method: 'GET',
        params,
    });
}
export async function GetTreeList(params: any, control: string) {
    return request('/api/services/app/' + control + '/GetTreeListAsync', {
        method: 'GET',
        params,
    });
}

export async function abpIsTenantAvailable(params: any) {
    return request('/api/services/app/Account/IsTenantAvailable', {
        method: 'POST',
        data: params,
    });
}
export async function GetAllPermissions() {
    return request('/api/services/app/Role/GetAllPermissions', {
        method: 'GET',
    });
}

export async function ChangePassword(params: any) {
    return request('/api/services/app/User/ChangePassword', {
        method: 'POST',
        data: params,
    });
}

export async function GetListByCustAsync(params: any) {
    return request('/api/services/app/UserPayChanel/GetListByCustAsync', {
        method: 'GET',
        params,
    });
}

export async function EnablePayChanelAsync(params: any) {
    return request('/api/services/app/UserPayChanel/EnablePayChanelAsync', {
        method: 'POST',
        params,
    });
}
export async function GetOptsAsync(params: any) {
    return request('/api/services/app/UserPayChanel/GetOptsAsync', {
        method: 'GET',
        params,
    });
}